import request from '@/router/axios';

export const getList = (params) => {
  return request({
    url: '/api/bill/listBill',
    method: 'get',
    params: {
      ...params
    }
  })
}
export const getNewDetail = (params) => {
  return request({
    url: '/api/billDetail/billDetailList',
    method: 'get',
    params: {
      ...params
    }
  })
}

export const getDetail = (params) => {
  return request({
    url: '/api/orderDetail/billOrderList',
    method: 'get',
    params: {
      ...params
    }
  })
}
export const getSeDetail = (params) => {
  return request({
    url: '/api/orderDetail/billOrderListSe',
    method: 'get',
    params: {
      ...params
    }
  })
}
export const getUpdata = (row) => {
  return request({
    url: '/api/billDetail/saveAll',
    method: 'post',
    data:row

  })
}
export const getNowUpdata = (row) => {
  return request({
    url: '/api/billDetail/saveAllIsDraft',
    method: 'post',
    data: row
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/billDetail/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const Fathremove = (ids) => {
  return request({
    url: '/api/bill/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}
export const add = (row) => {
  return request({
    url: '/api/orderDetail/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/bill/update',
    method: 'post',
    data: row
  })
}

